<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('AdminCategory/index')}">兑分记录</a></li>
        <!--<li><a href="{:url('AdminCategory/add')}">添加分类</a></li>-->
    </ul>

    <!--<form class="well form-inline margin-top-20" method="post" action="{:url('AdminPoints/index')}">-->
        <!--姓名:-->
        <!--<input type="text" class="form-control" name="keyword" style="width: 200px;"-->
               <!--value="{$keyword|default=''}" placeholder="请输入用户姓名">-->
        <!--<input type="submit" class="btn btn-primary" value="搜索"/>-->
        <!--<a class="btn btn-danger" href="{:url('AdminPoints/index')}">清空</a>-->
    <!--</form>-->


    <form method="post" class="js-ajax-form" action="{:url('AdminCategory/listOrder')}">
        <div class="table-actions">

            <button class="btn btn-danger btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('AdminPoints/points_list_all_del')}" data-subcheck="true" data-msg="您确定删除吗？">
                批量删除
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">用户ID</th>
                <th>用户名</th>
                <th>总分数</th>
                <th>可用分数</th>
                <th>已用分数</th>
                <th>总时长(小时)</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
                    <td>{$vo.user_id}</td>
                    <td>{$vo.user.user_nickname}</td>
                    <td>{$vo.all_points}</td>
                    <td>{$vo.can_points}</td>
                    <td>{$vo.used_points}</td>
                    <td>{$vo.duration|s_to_h}h</td>


                    <td>
                        <a class="btn btn-xs btn-primary btn-warning js-ajax-dialog-btn" href="{:url('AdminPoints/set_points_null',['id'=>$vo.id])}">清空</a>
                        <a class="btn btn-xs btn-primary btn-danger js-ajax-dialog-btn" href="{:url('AdminPoints/points_list_del',['id'=>$vo.id])}">删除</a>
                    </td>
                    <!--<td>-->
                        <!--<a href="{:url('AdminCategory/edit',['id'=>$vo.id])}">编辑</a>-->
                        <!--<a class="js-ajax-delete" href="{:url('AdminCategory/delete',['id'=>$vo.id])}">删除</a>-->
                    <!--</td>-->
                </tr>
            </foreach>
            </tbody>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    $(document).ready(function () {
        Wind.css('treeTable');
        Wind.use('treeTable', function () {
            $("#menus-table").treeTable({
                indent: 20,
                initialState: 'expanded'
            });
        });
    });

</script>
</body>
</html>